<template>
  <div class="home_winning2">
    <div class="card_list_box">
      <ul :class="['card_title']">
        <li :class="['title_left']">
          <ImgT style="width:18px;height:18px;margin-right: 5px;" src="/imgs/home/game.png" alt="" />
          <span>热门电子游戏</span>
        </li>
      </ul>
      <div class="list">
        <GameList :games="list" :type="1" :gameWidth="82" :gameHeight="108" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { storeToRefs } from 'pinia';
import pinia from '@/store/index';
import { Page } from '@/store/page';
import GameList from "./gameList.vue";
const {
  homeGameData
} = storeToRefs(Page(pinia));

// const { t } = useI18n();
const list = computed(() => {
  let arr: any = []
  const hGame = homeGameData.value.find((item: any) => item.id == 0)
  if (hGame && hGame.three_platform && hGame.three_platform.length) {
    arr = hGame.three_platform.filter((game: any) => game.agentId == 1)
  }
  return arr
})

</script>

<style lang="scss" scoped>
.home_winning2 {
  .card_list_box {


    .card_title {
      display: flex;
      padding: 0 14px 0 0;
      justify-content: space-between;
      align-items: center;
      height: 24px;
      line-height: 24px;
      margin: 12px 0;
      padding-left: 14px;

      .title_left {
        font-family: PingFang SC;
        font-size: 14px;
        font-weight: 600;
        line-height: 16px;
        text-align: left;
        color: #fcfffa;
        display: flex;
        justify-content: space-between;
        align-items: center;

        img {
          width: 18px;
          height: 18px;
          margin-right: 5px;
        }
      }

      .title_left1 {
        font-family: PingFang SC;
        font-size: 12px;
        font-weight: 500;
        line-height: 12px;
        text-align: left;
        color: #C6C4F5;
        display: flex;
      }

      .title_right {
        font-family: PingFang SC;
        font-size: 12px;
        font-weight: 500;
        color: #C6C4F5;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 24px;

        .more {
          background: #282747;
          // margin-left: 8px;
          // height: 100%;
          line-height: 25px;
          padding: 0px 8px;
          border-radius: 6px;
          box-shadow: 0.5px 0.5px 1px 0px #4B4A6E inset;
        }

        .swiper-btn {
          position: relative;
          top: 4px;
          margin-left: 8px;
        }

        .disabled {
          pointer-events: none;
          opacity: 0.5;
          cursor: not-allowed;
        }
      }
    }

    .card_title1 {
      padding: 0 4px 0 0;
    }

    .winning_list {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;

      .winning_list_ul {
        display: flex;
        // margin: 0 14px;
        margin-bottom: 10px;

        .winning_list_li {
          width: 62.5px;
          height: 96px;
          margin-right: 8px;
          border-radius: 8px;
          background: #131232;
          box-sizing: border-box;
          padding: 8px;
          box-shadow: 0.5px 0.5px 1px 0px #2e296b inset;
          display: flex;
          flex-direction: column;
          justify-content: space-around;
          align-items: center;

          img {
            width: 46px;
            height: auto;
            border-radius: 8px;
          }

          .money {
            text-align: left;
            color: #FFF;
            font-family: "SF Pro Display";
            font-size: 10px;
            font-style: normal;
            font-weight: 700;
            line-height: 10px;
            /* 100% */
          }

          .name {
            width: 100%;
            font-family: "PingFang SC";
            font-style: normal;
            font-size: 10px;
            font-weight: 500;
            line-height: 10px;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: #A8A8CA;
          }
        }
      }
    }

    .masking_layer {
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      backdrop-filter: blur(1px);
      background: rgba(0, 0, 0, 0.6);
      font-family: PingFang SC;
      font-size: 12px;
      font-weight: 500;
      line-height: 18px;
      color: #ffffff;

      .maskin_img {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
      }
    }
  }
}
</style>
